//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.diboot.tenant.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.entity.BaseEntity;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import java.time.LocalDate;
import java.util.Date;

@TableName("dbt_iam_tenant")
@Setter @Getter @Accessors
public class IamTenant extends BaseEntity<String> {
    private static final long serialVersionUID = 8712006740734247869L;
    public static final String DICT_TENANT_STATUS = "TENANT_STATUS";
    @TableField
    private @NotNull(
            message = "租户名称不能为空"
    ) @Length(
            max = 100,
            message = "租户名称长度应小于100"
    ) String name;
    @TableField
    private @NotNull(
            message = "租户编码不能为空"
    ) @Length(
            max = 20,
            message = "租户编码长度应小于20"
    ) String code;
    @TableField
    private @NotNull(
            message = "起始日期不能为空"
    ) LocalDate startDate;
    @TableField
    private @NotNull(
            message = "截止日期不能为空"
    ) LocalDate endDate;
    @BindQuery(
            comparison = Comparison.LIKE
    )
    private @Length(
            max = 50,
            message = "负责人长度应小于50"
    ) String manager;
    @TableField
    private @Length(
            max = 20,
            message = "联系电话长度应小于20"
    ) String phone;
    @TableField
    private @Length(
            max = 100,
            message = "描述长度应小于100"
    ) String description;
    @TableField
    private @Length(
            max = 10,
            message = "租户状态长度应小于10"
    ) String status;
    @TableField(
            fill = FieldFill.INSERT
    )
    private String createBy;
    @TableField(
            fill = FieldFill.UPDATE
    )
    private Date updateTime;
    /**
     * OA公司编码
     */
    private String oaNum;

    /**
     * 销售组织
     */
    private String orgId;

    /**
     * 是否跨租户
     */
    @TableField
    private Integer crossTenant;

    public IamTenant() {
    }


}
